<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of CellItem
 *
 * @author julien
 */
require_once 'Classes/View/ViewItems/ComposedViewItem.php';

class CellItem extends ComposedViewItem {
    private $title;
    private $content;
    
    public function __construct() {
        parent::__construct();
        $this->title = new TextFieldItem();
        $this->title->unsetEndingSpace();
        $this->title->setClass("cellTitle");
        
        
        $this->content = new ComposedViewItem();
        $this->content->unsetEndingSpace();

        
        
        $this->addElement($this->title);
        $this->addElement($this->content);
        
        
    }
    
    public function setTitle($title){
        if(is_a("ViewElement",$title)){
            $this->title->setText($title->getHTML());
        }
        else {
            $this->title->setText($title);
        }
    }
    
  
    public function addContent($content){
       $this->content->addElement($content);
       
    }
}

?>
